function [ index ] = Pmap( i,j )
% Returns index on Pressure matrix for 1:2 expansion problem
% Inputs:
% i: index denotes spacial X position
% j: index denotes Y spatial position
%

global NIt
global NJt
global NIe
global NJe

if ( j <= NJe )
    % Located below expansion
    index = i + (j-1) * NIt;
else
    % Located above expansion
    block1 = NIt*NJe;
    is = i-NIe;
    js = j-NJe;
    index = block1 + is + (NIt-NIe) * (js-1);
    if (is<1 || js<1)
        error = 'OUT OF BOUNDS PIJ'
    end
end




end

